Skip to main content
Version: 1.0.2

Authorize/Freeze

The Authorize/Freeze API allows users to set or clear specific flags related to asset authorization and freeze on a Stellar account. These flags control the account's ability to send/receive assets and maintain liabilities, as well as its ability to be frozen (i.e., prevent any further transactions)

Method: POST

{{URL}}/jsonrpc

Headers

NameValue
Content-Typeapplication/json

Example

Response Parameters
ParameterDescription

SourceAccount

Object

PublicKey

Mandatory

String

The public key of the account initiating the authorization/freeze operation.

Ex: "GCPLZXWATKYY3OXXHDOU3TSIUNZA5ZVBMM6P6ONGZQJHICXSFGFWNBPW"

PrivateKey

Mandatory

String

The private key associated with the source account for authentication.

Ex: ""

IssuerAccount

Object

publicKey

Mandatory

String

The public key of the account that issued the asset for which the flags are being set.

Ex: "GAUMO2B3RA6HRNDEVZUZAV5ZP2YE5V37UZTIFMKKRAH2IK5XDTZBJCZ3"

PrivateKey

Mandatory

String

The private key associated with the issuer account for authentication.

Ex: ""

Asset

Object

Code

Mandatory

String

The code representing the asset for which the authorization/freeze flags are being set.

Ex: "XDUS"

IssuerKey

Mandatory

String

The public key of the account that issued the asset.

Ex: "GAHQYF2BNR5PGXPMWHOPXQA2Y3T2HVBBBF7ON7D2427T7FPZRMIRE6XD"

DestinationAccount

Object

publicKey

Mandatory

String

The public key of the account for which the authorization/freeze flags are being set.

Ex: "GAUMO2B3RA6HRNDEVZUZAV5ZP2YE5V37UZTIFMKKRAH2IK5XDTZBJCZ3"

PrivateKey

Mandatory

String

The private key associated with the destination account for authentication.

Ex: ""

SetFlages

Object

Authorised

Mandatory

Boolean

Specifies whether the account is authorized to hold and transact the specified asset.

Ex: true

AuthorizedToMaintainLiabilities

Mandatory

Boolean

Indicates whether the account is authorized to maintain liabilities for the specified asset.

Ex: true

ClearFlags

Object

Authorised

Mandatory

Boolean

Specifies whether the account's authorization for the asset should be cleared.

Ex: false

ClawbackEnabled

Mandatory

Boolean

Specifies whether the clawback ability for the specified asset should be cleared.

Ex: false

Body


{
"SourceAccount": {
"PublicKey": "GCPLZXWATKYY3OXXHDOU3TSIUNZA5ZVBMM6P6ONGZQJHICXSFGFWNBPW",
"PrivateKey": ""
},
"IssuerAccount": {
"publicKey": "GAUMO2B3RA6HRNDEVZUZAV5ZP2YE5V37UZTIFMKKRAH2IK5XDTZBJCZ3",
"PrivateKey": ""
},
"Asset": {
"Code": "XDUS",
"IssuerKey": "GAHQYF2BNR5PGXPMWHOPXQA2Y3T2HVBBBF7ON7D2427T7FPZRMIRE6XD"
},
"DestinationAccount": {
"publicKey": "GAUMO2B3RA6HRNDEVZUZAV5ZP2YE5V37UZTIFMKKRAH2IK5XDTZBJCZ3"
},
"SetFlages": {
"Authorised": true,
"AuthorizedToMaintainLiabilities": true
},
"ClearFlags": {
"Authorised": false,
"ClawbackEnabled": false
}
}

Response: 200

Response Parameters
ParameterDescription

hash

String

A unique identifier representing the transaction hash of the Authorize/Freeze operation.

Ex: "fbef2e61b8961114a285a8d1ba9c20076f13f636db4fc452dae64bf763390724"


{
"hash": "fbef2e61b8961114a285a8d1ba9c20076f13f636db4fc452dae64bf763390724"
}